package com.yuyou.tas.lesson.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.tas.service.api.lesson.entity.LessonClassChapter;

@Mapper
public interface LessonClassChapterMapper {
    int deleteByPrimaryKey(Long id);

    int deleteByLessonClassId(Long lessonClassId);

    int insert(LessonClassChapter record);

    LessonClassChapter selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LessonClassChapter record);

    LessonClassChapter selectByLessonIdClassIdChapterId(@Param(value = "lessonClassId") Long lessonClassId, @Param(value = "lessonId") Long lessonId, @Param(value = "lessonChapterId") Long lessonChapterId);
    
    List<LessonClassChapter> findBylesChaId(Long lessonChapterId);

    List<LessonClassChapter> findByLessonClassId(Long lessonClassId);

    List<LessonClassChapter> findOldData();

    void updateUrl2empty(Long id);

    Integer findByResourceId(@Param(value = "resourceId") String resourceId);
    
    int findCountByLectureUrl(String lectureUrl);
    
    int findCountByCourseUrl(String courseUrl);
    
}